﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

using Blog.TemplateEngine;

namespace Blog.TemplateViewEngine.Filters
{
    class EncodeFilter : IFilter
    {
        protected string Filter(string input, object parameter)
        {
            return HttpUtility.HtmlEncode(input);
        }

        protected bool HasParameter
        {
            get { return false; }
        }

        bool IFilter.HasParameter
        {
            get { return HasParameter; }
        }

        string IFilter.Filter(string input, object parameter)
        {
            return Filter(input, parameter);
        }
    }
}
